OSAScriptingComponentName
You can use the OSAScriptingComponentName function to get the name of a scripting component.
FUNCTION OSAScriptingComponentName
(scriptingComponent: ComponentInstance;
VAR resultingScriptingComponentName: AEDesc): OSAError;
scriptingComponent
- A component instance created by a prior call to the Component Manager function
OpenDefaultComponent or OpenComponent (see page 10-4).
resultingScriptingComponentName
- The name of the scripting component; or, if the component is the generic scripting component, the name of the default scripting component.
DESCRIPTION
The OSAScriptingComponentName function returns a descriptor record that you can coerce to a text descriptor type such as typeChar. This can be useful if you want to display the name of the scripting language in which the user should write a new script.
RESULT CODES
| noErr | 0 | No error |
| errOSASystemError | -1750 | General scripting system error |
| badComponentInstance | $80008001 | Invalid component instance |
SEE ALSO
For an example of the use of OSAScriptingComponentName, see Listing 10-2 on page 10-9.